<template>
	<view class="page friend_Page">
		<headerinfo></headerinfo>
		<u-navbar title="编辑资料" :placeholder="true" :autoBack="true" ></u-navbar>
		<view class="changeMy">
			<u--input
				class="input"
			    placeholder="请输入"
			    border="surround"
				clearable
			    v-model="nickname"
			  ></u--input>
			 
		</view>
		<view class="btn" @click="rightClick">
			保存
		</view>
	</view>
</template>

<script>
export default {
	components: {},
	data() {
		return {
			nickname:''
		};
	},
	onLoad(e) {
		this.nickname = e.nickname
	},
	methods: {
		rightClick(){
			if(this.nickname == ''){
				return this.$Show.show('昵称不能为空')
			}
			
			this.$api.updateNicknameOrRemark({nickname:this.nickname}).then(res=>{
				this.$Show.successJump('修改成功')
			})
		}
	}
};
</script>

<style lang="scss" scoped>
.page {
	background-color: #fff;
}
.changeMy {
	width: 700rpx;margin: 0 auto;
	margin-top: 30rpx;
	.input{
		height: 90rpx;
		padding: 0 30rpx;
		border:none;
	}
}
.btn{
	width: 700rpx;
	height: 90rpx;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 10rpx;
	margin: 50rpx auto;
	background-color: #de4849;color: #fff;
}
</style>
